# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=ntlm-scanner
pkgver=6.4b29329
pkgrel=6
groups=('blackarch' 'blackarch-scanner')
pkgdesc='A simple python tool based on Impacket that tests servers for various known NTLM vulnerabilities.'
arch=('any')
url='https://github.com/preempt/ntlm-scanner'
license=('MIT')
depends=('python2' 'python2-impacket' 'python2-setuptools')
makedepends=('git')
source=("git+https://github.com/preempt/$pkgname.git")
sha512sums=('SKIP')

prepare () {
  cd $pkgname

  sed -i 's|/usr/bin/env python|/usr/bin/env python2|' scan.py
}

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

package() {
  cd $pkgname

  install -Dm 755 scan.py "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
  install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

